<?php
/**
 * Created by PhpStorm.
 * User: skytop
 * Date: 16-9-3
 * Time: 下午3:33
 */

namespace Home\Widget;

use Think\Controller;
class HotWidget extends Controller
{
    public function blog(){
        //热门博文
        $field=array('id','title','click');
        $blog=M('blog')->field($field)->order('click DESC')->limit(3)->select();
        return $blog;
    }
}